package com.hbnu.follow.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hbnu.follow.mapper.FollowMapper;
import com.hbnu.follow.domain.Follow;
import com.hbnu.follow.service.IFollowService;

/**
 * 用户关注表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-28
 */
@Service
public class FollowServiceImpl implements IFollowService 
{
    @Autowired
    private FollowMapper followMapper;

    /**
     * 查询用户关注表
     * 
     * @param followerId 用户关注表主键
     * @return 用户关注表
     */
    @Override
    public Follow selectFollowByFollowerId(Long followerId)
    {
        return followMapper.selectFollowByFollowerId(followerId);
    }

    /**
     * 查询用户关注表列表
     * 
     * @param follow 用户关注表
     * @return 用户关注表
     */
    @Override
    public List<Follow> selectFollowList(Follow follow)
    {
        return followMapper.selectFollowList(follow);
    }

    /**
     * 新增用户关注表
     * 
     * @param follow 用户关注表
     * @return 结果
     */
    @Override
    public int insertFollow(Follow follow)
    {
        return followMapper.insertFollow(follow);
    }

    /**
     * 修改用户关注表
     * 
     * @param follow 用户关注表
     * @return 结果
     */
    @Override
    public int updateFollow(Follow follow)
    {
        return followMapper.updateFollow(follow);
    }

    /**
     * 批量删除用户关注表
     * 
     * @param followerIds 需要删除的用户关注表主键
     * @return 结果
     */
    @Override
    public int deleteFollowByFollowerIds(Long[] followerIds)
    {
        return followMapper.deleteFollowByFollowerIds(followerIds);
    }

    /**
     * 删除用户关注表信息
     * 
     * @param followerId 用户关注表主键
     * @return 结果
     */
    @Override
    public int deleteFollowByFollowerId(Long followerId)
    {
        return followMapper.deleteFollowByFollowerId(followerId);
    }
}
